let obj = {
	a: 1,
	b: 'hello',
	c: true,

	// 使用生成器函数
	[Symbol.iterator] : function * () {
		var index = 0 ;
		var entries  = Object.entries(obj)
		while(index < entries.length) {
			yield entries[index++][1]
		}
	}
}


for(var a of obj) {
	console.log(a)
}

console.log('-----------------------\n')

var it = obj[Symbol.iterator]();
console.log(it, it.constructor)

console.log(it.next())
console.log(it.next())
console.log(it.next())
console.log(it.next())
